using UnityEngine;
using System;
using System.IO;
using System.Collections.Generic;
using WFTools;

[Serializable]
public class MonsterType 
{ 
	/// <summary>
	///ID
	/// <summary>
	public readonly int id;
	/// <summary>
	///血量
	/// <summary>
	public readonly int hp;
	/// <summary>
	///魔量
	/// <summary>
	public readonly int mana;
	/// <summary>
	///速度
	/// <summary>
	public readonly float speed;
	/// <summary>
	///是否死亡
	/// <summary>
	public readonly bool isDead;
	/// <summary>
	///名字
	/// <summary>
	public readonly string monsterName;
	/// <summary>
	///出生月
	/// <summary>
	public readonly Month birthMonth;
	public MonsterType(List<string> datas)
{	
		int value = 0;
		id = int.Parse(datas[0]);
		hp = int.Parse(datas[1]);
		mana = int.Parse(datas[2]);
		speed = float.Parse(datas[3]);
		isDead = int.Parse(datas[4])==1;
		monsterName = datas[5];
		if (int.TryParse(datas[6],out value))birthMonth = (Month)int.Parse(datas[6]); else birthMonth = (Month)Enum.Parse(typeof(Month),datas[6]);
	}
} 
